package fr.uparis10.miage.m1p1.menu.departement;

import java.util.ArrayList;

import fr.uparis10.miage.m1p1.core.Employe;
import fr.uparis10.miage.m1p1.menu.MenuExecutor;
import fr.uparis10.miage.classic.m1.p3.Departement;
import fr.uparis10.miage.classic.m1.p3.ObjectJ;
import fr.uparis10.miage.m1p1.config.Configurator;
public class ShowEmployeDepartementExecutor implements MenuExecutor{
	public void execute() {
		
		
        ObjectJ entr = Configurator.getInstance().getObjectJ();
		ArrayList<Departement> listDept = entr.getDeptement();
		ArrayList<Employe> listEmplDept ;
		System.out.println("===================================");
		System.out.println("      LISTE DES DEPARTEMENTS       ");
		System.out.println("===================================");
		for(Departement d:listDept){
			System.out.println("NOM DEPARTEMENT : " + d.getNom());
			listEmplDept = d.getEmploye();
			System.out.println("LES EMPLOYES");
			for(Employe e:listEmplDept)
				System.out.println(e.toString());
		}
		System.out.println("===================================");
	}

}
